home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part1 / 5643 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.4 KB

  1. Path: wkaufman.us.oracle.com!wkaufman
  2. From: wkaufman@wkaufman.us.oracle.com (William Kaufman)
  3. Newsgroups: comp.lang.c
  4. Subject: Re: memory allocation using malloc and free
  5. Date: 20 Feb 1996 06:40:39 GMT
  6. Organization: Oracle Corporation, Redwood Shores CA
  7. Message-ID: <4gbqd7$1em@inet-nntp-gw-1.us.oracle.com>
  8. References: <4gagll$5rc@bertrand.ccs.carleton.ca> <danpop.824767980@rscernix>
  9. NNTP-Posting-Host: wkaufman.us.oracle.com
  10.  
  11. In article <danpop.824767980@rscernix> danpop@mail.cern.ch (Dan Pop) writes:
  12. ] In <4gagll$5rc@bertrand.ccs.carleton.ca> tcope@chat.carleton.ca (Tyler Cope) writes:
  13. ] >Could someone please demonstrate the proper (or _a_ proper) ANSI
  14. ] >method of allocating >64K space using malloc and free.
  15. [...]
  16. ] The usual workaround on unextended MSDOS is to use vendor-specific
  17. ] functions which take long or unsigned long arguments.  Of course, this
  18. ] has nothing to do with ANSI C any longer.
  19.  
  20.     One work-around which _is_ ANSI C would be to break the allocation
  21. down into a two-dimensional array where each dimension is less than 64K.
  22. The memory won't be continguous anymore, but this is often not a severe
  23. restriction.  And, it's portable.
  24.  
  25.                                            -- Bill K.
  26.  
  27. Bill Kaufman               | " While not a master of intellect, the blatantly
  28. wkaufman@us.oracle.com     |   obvious things we take for granted never
  29.                            |   escape his keen eye! "          -- Bob Burden
  30.